This lets me build a statically linked cargo on our linux-cross Docker image with the following
commands:
$ apt-get install musl-tools # for musl-gcc, which is needed to build openssl
$ ./.travis.install.deps.sh
$ ./configure --local-rust-root=$(pwd)/rustc --enable-nightly --target=x86_64-unknown-linux-musl
$ make
$ file target/x86_64-unknown-linux-musl/release/cargo
cargo: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked (..)
targets = [
'i686-unknown-linux-gnu',
'x86_64-unknown-linux-gnu',
+ 'x86_64-unknown-linux-musl',
'arm-unknown-linux-gnueabi',
'arm-unknown-linux-gnueabihf',
'armv7-unknown-linux-gnueabihf',